public class Judge {
    public static boolean Func(int[] arr){
        int count=0;
        int tmp=0;
        for(int i=0;i< arr.length;i++){
            if(arr[i]%2!=0){
                count++;
                tmp=i;
            }
            if(count>=3){
                tmp=tmp-count+1;
                while(count>0){
                    System.out.print(arr[tmp]+" ");
                    count--;
                    tmp++;
                }
                return true;
            }
        }
        return false;
    }
    public static void main(String[] args) {
        int[]arr=new int[]{2,1,1,3,5,2,4};
        boolean ret=Func(arr);
    }
}
